package com.yami.shop.api.controller;

import cn.hutool.json.JSONObject;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.service.AdvertisingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wxf
 * @date 2023/6/14 11:12
 */
@RestController
@RequestMapping("/advertising")
public class AdvertisingController {

    @Autowired
    private AdvertisingService advertisingService;

    @GetMapping("/ua/getAdvertising")
    public ServerResponseEntity<List<JSONObject>> getAdvertising(){
        return ServerResponseEntity.success(advertisingService.getAdvertising());
    }
}
